sdmdlgraphdefinition module

class sd.api.mdl.sdmdlgraphdefinition.SDMDLGraphDefinition(APIContext, handle, *args, **kwargs)

Bases: sd.api.sdgraphdefinition.SDGraphDefinition

A graph definition based on MDL backend

addDefinition(sdDefinition: sd.api.sddefinition.SDDefinition) → None

Add the definition the graph definition will support

Parameters

sdDefinition – The node definition to add

addType(sdType: sd.api.sdtype.SDType) → None

Add the type the graph definition will support

Parameters

sdType – The type to add

getClassName() → str

Returns the most specific name of the class this APIObject is

getDefinitionFromId(id: str) → Optional[sd.api.sddefinition.SDDefinition]

Get the SDDefinition that match the specified Id

Parameters

id – The id of the SDDefinition to retrieve

getId() → str

Get the identifier of the graph definition

release() → None

Releases an APIObject

removeDefinition(sdDefinition: sd.api.sddefinition.SDDefinition) → None

Remove the specified definition from the graph definition

Parameters

sdDefinition – The node definition to remove

static sNew(id: str) → sd.api.mdl.sdmdlgraphdefinition.SDMDLGraphDefinition

Create new SDTypeVoid

Parameters

id – The id of the outSDMDLGraphDefinition. It has to be unique in the application.

setIconFile(iconFilePath: str) → None

Set the icon of the graph definition from the specified file

Parameters

iconFilePath – The file of the icon

setLabel(label: str) → None

Set the label of the graph definition

Parameters

label – The label of the graph definition